home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / security / logdaemon-4.8.README < prev    next >
Text File  |  1995-04-24  |  19KB  |  482 lines

  1. A change log can be found at the end of this document.
  2.  
  3. Introduction:
  4. =============
  5.  
  6. This archive contains the result of years of gradual transformations on
  7. BSD source.  The code works with SunOS 4, SunOS 5 (Solaris), Ultrix 4.x
  8. and other BSD/SYSV4 clones. Parts work hybrids: IRIX 5.3 and HP-UX 9.0.
  9.  
  10. (1) rsh and rlogin daemons that log the remote username and perform
  11.     logging and access control in tcp/ip wrapper style.  By default
  12.     these daemons do not accept wildcards in hosts.equiv or .rhosts
  13.     files. Both daemons have an '-l' option to disable user .rhosts
  14.     files.
  15.  
  16. (2) ftpd, rexecd and login software with fascist login failure logging
  17.     and with optional support for S/Key one-time passwords.  The rexecd
  18.     daemon disallows root logins, once my favourite backdoor.  The
  19.     support for S/Key one-time passwords is optional, and completely
  20.     invisible to users that do not need it. UNIX passwords are still
  21.     permitted by default. A short description of how to use S/Key can
  22.     be found in the skey subdirectory. Binaries for DOS and other
  23.     systems can be found on thumper.bellcore.com.
  24.  
  25. (3) an S/Key login shell for sites that cannot replace the login
  26.     program. Users first log into a password-less dummy account. The
  27.     S/Key login shell prompts for their real account name and presents
  28.     the corresponding S/Key challenge.
  29.  
  30. The S/Key support uses the MD4 or MD5 hash function. The mode (MD4 by
  31. default, for backwards compatibility) is selected in skey/Makefile.
  32.  
  33. The rshd and rlogind programs need the libwrap.a library that comes
  34. with recent (version >= 7.0) tcp/ip daemon wrapper implementations.
  35. In order to build rshd and rlogind you will have to do a
  36.  
  37.     setenv LOG_TCP /directory/with/libwrap.a
  38.  
  39. Contents per directory:
  40. =======================
  41.  
  42. rlogind logging and access control in tcp wrapper style.  Regular
  43.     access is logged (by default) with priority daemon.info.
  44.     Rejected access is logged with daemon.warn or more urgent.
  45.     SunOS 4.x, SunOS 5.x and Ultrix 4.x. In order to use the "-l"
  46.     (ignore user .rhosts files) option you will also need to
  47.     install the login clone (see below). May work with HP-UX 9.0,
  48.     never tried with IRIX because rlogind already has logging.
  49.  
  50. rshd    logging and access control in tcp wrapper style.  Regular
  51.     access is logged (by default) with priority daemon.info.
  52.     Rejected access is logged with daemon.warn or more urgent.
  53.     SunOS 4.x, SunOS 5.x and Ultrix 4.x. May work with HP-UX 9.0,
  54.     never tried with IRIX because rshd already has logging.
  55.  
  56. login   hacked for SunOS 4.x, SunOS 5.x, with optional access control
  57.     per (user,host) or per (user, tty); fbtab(5) security; fascist
  58.     login failure logging.  Regular logins are logged with priority
  59.     auth.info, unusual or rejected logins with auth.notice. S/Key
  60.     support. Can also be used with Ultrix 4.x for logins on
  61.     non-graphics consoles. Appears to work with IRIX 5.3, HP-UX 9.0.
  62.  
  63. rexecd  Regular access is logged with priority daemon.info.  Fascist
  64.     login failure logging.  Rejected access is logged with
  65.     auth.warn or more urgent. Access to the root account is
  66.     prohibited.  S/Key support. SunOS 4.x, SunOS 5.x and IRIX 5.3.
  67.     Should also work with Ultrix. May work with HP-UX 9.0.
  68.  
  69. ftpd    ftp daemon with fascist logging and login failure detection
  70.     much like the login clone. Also logs anonymous ftp transfers.
  71.     Tested with SunOS [45].  S/Key support. Should also work with
  72.     Ultrix 4.x. May work with IRIX 5.3 and HP-UX 9.0.
  73.  
  74. telnetd pretty dumb BSD 4.3 telnetd. No access control or logging,
  75.     but compatible with SunOS 4.x, Ultrix 4.x, SunOS 5.x. Not
  76.     particularly useful for IRIX 5.3 and HP-UX 9.0.
  77.  
  78. keysu   NET/2 BSD su command ported back to SunOS 4.x, with S/Key
  79.     support. Tested with FreeBSD and SunOS 4.1.3. May work with
  80.     IRIX 5.3 and HP-UX 9.0.
  81.  
  82. skeysh  An S/key login shell for sites that cannot replace the login
  83.     program. The solution is to create a dummy account with skeysh
  84.     as the login shell. skeysh is nothing but a stripped-down
  85.     skey-only login program.  People first log into the dummy
  86.     account. This drops them into skeysh that prompts them for
  87.     their real account name and presents the corresponding S/Key
  88.     challenge.  Tested with SunOS 4.1.3 and with Solaris 2.3 and
  89.     IRIX 5.3.  Should work anywhere the login clone works.
  90.  
  91. lib     additional routines used by login and by some daemons.
  92.     Includes the ruserok() function that understands NIS, NFS
  93.     (yuck) and that optionally skips user .rhosts files.
  94.  
  95. skey    Portions of S/Key source from thumper.bellcore.com, plus
  96.     that I hacked together myself. All bugs are my own. Edit
  97.     the Makefile to choose between the MD4 or MD5 secure hash
  98.     function. MD4 is default, for backwards compatibility.
  99.  
  100. The README* files in the respective subdirectories give more details.
  101.  
  102. Please report any problems to:
  103.  
  104.     Wietse Venema (wietse@wzv.win.tue.nl)
  105.     Eindhoven University of Technology
  106.     Eindhoven, The Netherlands
  107.  
  108. Change log:
  109. ===========
  110.  
  111. 901218    Fixed a problem with NOFLSH in login.c that caused interrupts
  112.     to not flush the terminal input queue.
  113.  
  114. 910209    Added per-user login access control.
  115.  
  116. 911128    Added support to login for SunOS 4.x style /etc/fbtab, a table 
  117.     of devices whose protection and ownership is to be adjusted
  118.     when a user logs in.
  119.  
  120. 920609    Added tcp wrapper (log_tcp) style access control to rlogind and
  121.     rshd. Improved the remote host name verification code. Added the
  122.     LD_xxx environment fix to login.
  123.  
  124. 920624    Login no longer just dies when the connection is broken, but first
  125.     reports a login failure. This exposes an old cracker's trick.
  126.  
  127. 921029    Ported to Ultrix 4.2. Most of the work was finding out why the
  128.     login process did not have a controlling terminal.
  129.  
  130. 921208    Ported to Solaris 2.0. rlogind can now work with the /bin/login 
  131.     that comes with most UNIXes. This was desirable because not
  132.     everyone is in a position to replace /bin/login.  Moreover,
  133.     some SYSV logins can't even support the '-f' option at all (or
  134.     everyone could login without a password). 2alpha version released.
  135.  
  136. 921229    Tested with Solaris 2.1; some cleanups after looking at modified
  137.     4.4BSD sources from Charles Hedrick (hedrick@cs.rutgers.edu).
  138.     The sources can be found on farside.rutgers.edu.
  139.  
  140. 930103    Most of the sensible SYSV login features implemented. Frozen after 
  141.     check, check and double check. The source really suffered from
  142.     porting and has become too ugly. It becomes a lot more readable
  143.     after running through the unifdef program. Version 2beta released.
  144.  
  145. 930119  Version 2 released after compatibility patches: rshd path; 
  146.     disabling the local domain stripping in login.c; cleanup
  147.     utmpx file after rejecting an rlogin connection.
  148.  
  149. 930221    Added group support to the login access control code, so that we
  150.     can disallow off-site logins to wheel group members.  Group
  151.     matches work only for accounts that are explicitly listed in
  152.     the group file: the matching is not based on group id values.
  153.  
  154. 930222    Stole the code for the EXCEPT operator from the tcp wrapper.
  155.     This, and the previous change, allows me to replace:
  156.  
  157.         # Disallow non-local logins into the wheel accounts
  158.         +:foo bar baz:LOCAL .my.domain
  159.         -:foo bar baz:ALL
  160.  
  161.     into the much easier to understand:
  162.  
  163.         -:wheel:ALL EXCEPT LOCAL .my.domain
  164.  
  165.     Assuming, of course, that the default is to permit access.
  166.  
  167. 930331    Added per-program hints on how to configure syslogd.
  168.     Added __svr4__ to the Solaris CFLAGS macro because the
  169.     unbundled C compiler does not define it.
  170.  
  171. 930925  Upped the number of ptys that telnetd and rlogind will attempt
  172.     to open.  The original versions would give up after 64 ptys.
  173.  
  174. 930925    rshd now preserves TZ info when running under SunOS 5.
  175.     We were too compatible with SunOS 5. 
  176.  
  177. 930925    login will now syslog() all regular logins, too. It took
  178.     me too much time to examine individual wtmp files.
  179.  
  180. 930929  Ultrix last minute patch to fix rshd environment handling. The
  181.     fix must be ok for SunOS too but no time to verify this.
  182.  
  183. 931206    With SunOS 5.x, Do not pass the "-p" option to login.
  184.  
  185. 931212    Added logindevperm support for compatibility with SunOS 5.3.
  186.  
  187. 931212    Added support to the login command for secure (DES) RPC (only
  188.     for SunOS [45].x). This requires that the cleartext password be
  189.     kept around until we have dropped privileges.  Had to jump some
  190.     hoops to prevent the program from ever dropping core with a
  191.     cleartext password.
  192.  
  193. 931212    Print error message when the login.access file exists but
  194.     cannot be opened.
  195.  
  196. 931225    Added S/Key support to login 'cause I was going on a trip.
  197.  
  198. 931229    While on my trip, added S/Key support to ftpd.
  199.  
  200. 940106    Woke up at 5am and realized there was a problem in my S/Key stuff.
  201.  
  202. 940107    S/Key Solaris portability fixes from Douglas Lee Schales.
  203.  
  204. 940110    Make sure that keyinit does not produce world-writable files.
  205.  
  206. 940112    SysV4.0 wtmpx portability fixes from Baruch Cochavy.
  207.  
  208. 940124    Fixed some ftpd  and skey things that broke for Ultrix 4.x.
  209.  
  210. 940125    Fix for Solaris uname(2) >0 return value. I fixed this before
  211.     but somehow the change got misplaced. From Douglas Lee Schales.
  212.  
  213. 940130    Made initial seed from skeyinit.c more random (use seconds
  214.     instead of minutes). I managed to produce the same seed on
  215.     multiple machines. The whole seed generation procedure sucks
  216.     anyway:  taking the first two letters of a host name.
  217.  
  218. 940205  Made initial seed from skeyinit.c more random (use last 5
  219.     digits of current time in seconds).
  220.  
  221. 940206    Fixed some login Makefile things that broke for Ultrix 4.x.
  222.  
  223. 940206  Had some real fun with (argh) NIS+. The old BSD login code
  224.     would blindly close all filedescriptors > 2 right AFTER it had
  225.     processed the command-line options. I had to move the closing
  226.     of open files right to the top of the main program. The reason
  227.     for this is that all kinds of nisplus library routines secretly
  228.     open sockets or files and keep them open forever. They get very
  229.     upset when you unexpectedly close their open files.
  230.  
  231. 940306  Finally got so disgusted from the BSD/SYSV #ifdefs that I
  232.     began to clean up the login program. From now on we use POSIX
  233.     instead of BSD/SYSV ifdefs.  Many of my personal enhancements
  234.     are no longer conditional. Ultrix misses some definitions so
  235.     login won't compile there anymore.
  236.  
  237.     Kerberos code for login.c (John DiMarco <jdd@cdf.toronto.edu>).
  238.  
  239. 940312  Security feature: when S/Key decides whether UNIX passwords are
  240.     ok, skip IP addresses listed for the remote host that appear to
  241.     belong to someone else.
  242.  
  243.     Cleaned up the rlogind/telnetd code (POSIX interfaces instead
  244.     of BSD/SYSV ifdefs).
  245.  
  246.     Changed the ftpd S/Key password prompt so that the MS-DOS
  247.     `termkey' TSR can parse it.
  248.  
  249. 940314  Cleaned up the ftpd code (POSIX interfaces instead of BSD/SYSV
  250.     ifdefs).  Ultrix misses some definitions so ftpd won't compile
  251.     there anymore. 
  252.  
  253.     All code now compiles and works on freebsd, which has become
  254.     my development platform while traveling.
  255.  
  256.     The code compiles OK on an Indy running IRIX 5.something:
  257.     just pretend to be sunos5.
  258.  
  259. 940317  The telnetd/login programs no longer assume 7 or 8 bits, but
  260.     leave CS7/CS8 tty settings alone.
  261.  
  262. 940321    Modern rloginds seem to prefer 8-bit clean settings, so we
  263.     force CS8 from now on.
  264.  
  265. 940326    Our system administrator wanted netgroup support in the login
  266.     access control file. This took only a few lines of code. A
  267.     netgroup is written as @name, and can be used in host patterns
  268.     and in user patterns.
  269.  
  270.     Included the keyinfo command and documentation, after getting
  271.     rid of localisms.
  272.  
  273.     keyinit now restores the tty settings when it is interrupted.
  274.  
  275.     logdaemon-4.1.tar.Z released.
  276.  
  277. 940426    Backwards compatibility code for Ultrix in login and ftpd.
  278.  
  279.     Added keysu (s/key su) command. This has little to do with
  280.     daemon stuff but it just makes the package complete. This
  281.     has been tested only with SunOS 4.x and FreeBSD.
  282.  
  283.     Unset FLUSHO in login.c, in case it helps.
  284.  
  285. 940430  rexecd and rlogind now use the fd_set macros, to shut up
  286.     the ANSI C compiler.
  287.  
  288.     converted net/2 su.1 man page to old -man macro style.
  289.  
  290.     William C. DenBesten asked for user@host patterns in the login
  291.     access control files, so he could control many machines with
  292.     just one set of rules. Fortunately, this took only a few lines
  293.     of code.  The hostpart is matched against the local host name.
  294.     With user@host patterns and netgroups you can build impressive
  295.     patterns such as @usergroup@@hostgroup.
  296.  
  297. 940505  Peter Kossakowski (dfn cert) mentioned he usefulness of the -l
  298.     option to ignore user .rhosts files. On most systems, the
  299.     ruserok() library function have no support for that, so a
  300.     modified version is provided.
  301.  
  302.     As a bonus, '+' wildcards are by default no longer accepted.
  303.     Instead a loud complaint is sent to the syslogd. The programs
  304.     must be compiled without -DNOPLUS to re-enable '+' wildcards.
  305.  
  306.     The -l option is supported by rshd, rlogind and by the login
  307.     program (rlogind must pass on the -l option when the login
  308.     program does the hosts.equiv/rhosts processing).  Thus, in
  309.     order to use -l you will have to replace both rlogind and login
  310.     (and, of course, rshd).
  311.  
  312.     Most path names and syslog logging classes are now configurable
  313.     from the Makefile.
  314.  
  315. 940516    Fixed the README and released version 4.2.
  316.  
  317. 940523  Just like the login, the ftpd now tries to avoid dumping core
  318.     with cleartext or encrypted (shadow) passwords.
  319.  
  320. 940628  Generalized the format of the /etc/skey.access file so you can
  321.     permit/deny UNIX passwords depending on user, tty and/or host.
  322.     There is a new manual page, skey/skey.access.5 that documents
  323.     this new format.
  324.  
  325. 940718    Fixed another thing that broke with Ultrix: in lib/rcmd.c
  326.     moved an #endif up to above the rresvport() routine.
  327.  
  328.     Now that you can specify what terminals are secure, the S/Key
  329.     code has been modified to always permit UNIX passwords on the
  330.     console. This saves you the embarrasment of having to break
  331.     into your own machine. Alas, on some systems the console is
  332.     not called /dev/console.
  333.  
  334.     Released version 4.3.
  335.  
  336. 940908  Added -user and -host support to ruserok().  No-one complained
  337.     sofar, but most systems document it. Looks like one feature
  338.     that Berkeley dropped.
  339.  
  340.     HP-UX and BSDI support from Howard Chu for login, keysu and
  341.     s/key.
  342.  
  343.     Replaced Howard's "vendor" #ifdefs by "feature" #ifdefs.
  344.  
  345.     (s/key) When built with -DSECURETTY, the keysu command will not
  346.     accept the root password unless it is invoked from a secure
  347.     terminal.  Idea from Howard Chu.
  348.  
  349.     (s/key) "keyinit -s" would ask for counts up to 10000 but the
  350.     actual limit is 9999 (Howard Chu). 
  351.  
  352.     (s/key) Eliminated a possible localhost vs localhost.domain
  353.     clash (Howard Chu).
  354.  
  355. 940910  Collected system dependencies in one central file (sys_defs.h)
  356.     and cleaned up the Makefiles. This may help when porting to
  357.     other systems.
  358.  
  359. 940911  After discussions with Guido van Rooij, documented several host
  360.     name and address spoofing loopholes that may cause S/Key to
  361.     permit UNIX passwords to unauthorized clients.
  362.  
  363. 940914/5 Porting rexecd, ftpd, rlogind and telnetd to HP-UX 9.0 was not
  364.     impossibly difficult. The effort may be useful to someone.
  365.  
  366. 940917  Disabled the `site' extensions (umask, chmod) for ftp guest
  367.     logins.
  368.  
  369. 940922    Replaced the MD4 code by the byte-order independent versions 
  370.     from the NRL distribution on thumper.bellcore.com. MD4 is
  371.     still the default. Edit skey/Makefile to switch to MD5.
  372.  
  373. 941001  Idea from *Hobbit*: sites that cannot replace their login
  374.     program create a dummy s/key account with as login shell a very
  375.     much stripped-down skey-only login program.  The skeysh program
  376.     is my result of such an exercise.
  377.  
  378. 941002    Cleaned up docs and comments.
  379.  
  380.     Released version 4.4.
  381.  
  382. 941014    setenv() was missing an argument in skeysh/skeysh.c. This 
  383.     should not cause problems, but gcc barfs on it. sigh.
  384.  
  385. 941022    Fixed pointer indirection level in lib/utmp_login.c. This
  386.     would produce unpredictable results for HP-UX.
  387.  
  388. 941105  Parametrized some hard-coded lengths for environment variables
  389.     and fixed some rather short limits on username length.
  390.  
  391. 941121    Changed the default console from /dev/console to none. This is
  392.     more compatible with SysV (Kevin Davidson).
  393.  
  394. 941121  Dropped ptyopen() etc. support for HP-UX. Having to support
  395.     BSD and SYSV ptys is bad enough.
  396.  
  397. 941126  It seems that assignments of static data to the environ
  398.     variable may cause trouble on non-BSD systems. Instead of 
  399.  
  400.         environ = envinit; execl(...);
  401.  
  402.     we no longer replace environ but truncate it and use putenv():
  403.  
  404.         environ[0] = 0; putenv(...);
  405.  
  406. 941127  On System V all daemons now preserve the complete initial
  407.     environment. There were several reports of missing TZ values.
  408.     I was unable to reproduce them with Solaris 2.3 and gcc.
  409.  
  410. 941127  Fixed skey/skeylogin.c to look at more than just the first 8
  411.     characters of the login name.
  412.  
  413. 941127    Fixed something in the skeysh/Makefile that broke on Ultrix.
  414.  
  415.     Released version 4.5.
  416.  
  417. 941129  With Solaris 2.x, keysu would recognize '-' as a user name.
  418.     This is due to getopt() incompatibilities. Fix: SysV su does
  419.     not support options anyway, so drop the getopt loop.  Reported
  420.     by in1052@wlv.ac.uk (A.Parkes).
  421.  
  422. 941129    Found another static assignment to environ in keysu.c.
  423.  
  424. 941130    Should have used setenv() to set the user's path in keysu.
  425.     Reported by Patrick Cipiere <Patrick.Cipiere@sophia.inria.fr>.
  426.  
  427. 941209    With passive open, do not wait forever in accept(). Idea from
  428.     casper@fwi.uva.nl in article <3asnqc$1h0@mail.fwi.uva.nl>.
  429.  
  430. 941218  Changed rlogind and rshd to use the open-ended tcp wrapper 7.0
  431.     programmatic interface, so that banners can be used.
  432.  
  433. 950101    Patches from David Mazieres: close redundant file descriptors in
  434.     rshd and rexecd; workaround for broken HPUX setsid(); also, the
  435.     HP-UX baud-rate codes differ from those on other platforms.
  436.  
  437. 950101    Ftpd would send bare linefeeds when listing files over an
  438.     ASCII-mode data connection, causing problems with wattcp
  439.     clients (reported by Shou-Chuan Lai).
  440.  
  441. 950108    Released 4.6, together with TCP wrappers 7.0.
  442.  
  443. 950111  David Mazieres: HPUX cc is pickier than I expected. What's
  444.     worse, they already define a struct request_info. Time for a
  445.     horrible workaround.
  446.  
  447. 950111  In S/Key passwords, accept commas instead of blanks, to work
  448.     around stupid software that collapses blanks in passwords.
  449.  
  450. 950121    Added SYSV shadow support to keysu (suggestion: Leif Hedstrom).
  451.  
  452. 950213    skeyaccess could dereference a null pointer when host lookup
  453.     failed (Larry J. Blunk @ Merit.edu). How embarrassing.
  454.  
  455. 950222    Make ftpd try again when the data port bind() fails with
  456.     EADDRINUSE.
  457.  
  458. 950222    keysu did not strip the "/dev/" from the device name when
  459.     looking for a secure terminal (Rob Liebschutz).
  460.  
  461.     Released 4.7.
  462.  
  463. 950229  Oops. The securetty code in keysu looked at the wrong tty
  464.     variable (Matthew Needes).
  465.  
  466. 950308  Some Solaris applications may pass a '-' as username to
  467.     /usr/bin/login (Kadlecsik Jozsi).
  468.  
  469. 950321  Protected all environ[0]=0 assignments by a test if environ is
  470.     nonzero. Ultrix daemons may have a null environment pointer,
  471.     how bizarre. Paul Sijben helped me figure out this one.
  472.  
  473. 950414  Oops. do_access() should call exit() not cleanup() (credits to
  474.     Shou-Chuan Lai of National Tsing Hua University).
  475.  
  476. 950422  Completed ULIMIT, UMASK and SLEEPTIME login default support.
  477.  
  478. 950423  IRIX 5.3 support for s/key utilities and login/ftpd/rexecd.
  479.     I still need to figure out what some IRIX login options do.
  480.  
  481.     Released 4.8.
  482.